Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add language and new methods in Source #2

Merged
merged 7 commits into from
Dec 24, 2024
Merged

Add language and new methods in Source #2

merged 7 commits into from
Dec 24, 2024

Conversation

AntsyLich
Copy link
Member

No description provided.

Comment on lines +46 to +54
/**
* Get a page with a list of manga.
*
* @since extensions-lib 1.5
* @param query the search query.
* @param filters the list of filters to apply.
* @param page the page number to retrieve.
*/
suspend fun getMangaList(query: String, filters: FilterList, page: Int): MangasPage = throw Exception("Stub!")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why a new search method in Source? what about getSearchManga

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PR is towards the main branch which doesn't have getSearchManga but either way this is basically replacing it.

library/src/main/java/eu/kanade/tachiyomi/source/Source.kt Outdated Show resolved Hide resolved
@@ -21,6 +23,36 @@ interface Source {
*/
val name: String

/**
* Represents an IETF BCP 47 compliant language tag.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to specify regions and scripts in languages?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just correctly representing what app expected for extensions to return and extensions were returning for lang property

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like pt-br, zh-Hant, zh-TW etc. are IETF BCP 47

Copy link

@vetleledaal vetleledaal Dec 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the API to be unambiguous? No, but it sounds like a good idea.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @AwkwardPeak7 was under the impression that instead of en sources will need to specify en-us

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering the comment beneath mentions "all" as a legal tag, shouldn't that be one of the options together with MULTI and OTHER? Or at the very least mentioned in the same bulleted list?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Antsy forgot to remove the comment when he removed ALL

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the javadoc

@AntsyLich AntsyLich changed the title Add language and search related methods in Source Add language and new methods in Source Dec 21, 2024
@@ -21,6 +23,36 @@ interface Source {
*/
val name: String

/**
* Represents an IETF BCP 47 compliant language tag.
Copy link

@vetleledaal vetleledaal Dec 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the API to be unambiguous? No, but it sounds like a good idea.

@AntsyLich AntsyLich merged commit 6d1f1a2 into main Dec 24, 2024
@AntsyLich AntsyLich deleted the new/source branch December 24, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants